﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace proLearningEnglish
{
    class Common
    {
        public Common()
        {
        }

        public void addNode(TreeNode node, SimpleWord objWord, DataManager objDataManager)
        {
            TreeNode nodeTmp = node.Nodes.Add(objWord.getID(), objWord.getLabel());
            nodeTmp.Tag = objWord;
            List<Word> lst = objDataManager.getIsAChildWordNodes(objWord);
            for (int i = 0; i < lst.Count; i++)
            {
                addNode(nodeTmp, (SimpleWord)lst[i], objDataManager);

            }
        }
    }
}
